﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<NETMovie.UI.WebMVC.Models.PaymentSummaryModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Successful Payment
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Payment Success!</h2>

    <% using (Html.BeginForm("ShowPaymentSummary", "Rental"))
       {%>
        <%: Html.ValidationSummary(false, "The operation is unsuccessful. Please see the errors listed.")%>

        <div class="display-label">Transaction No.       : <%: Model.CartInfo.TransactionNo%></div>
        <div class="display-label">PayPal Transaction No.: <%: Model.GWTransactionNo%></div>
        <table cellspacing="0" cellpadding="1" style="width:100%;">
            <tr class="th_header">
                <th class="th_color" style="width:20%;">&nbsp;</th>
                <th class="th_color" style="width:50%;">Movie</th>
                <th class="th_color" style="width:10%;">Due Date</th>
                <th class="th_color" style="width:20%;">Amount</th>
            </tr>
        <% if (Model.CartInfo.RentalRecords == null || Model.CartInfo.RentalRecords.Count == 0)
           { %>
            <tr>
                <td colspan="4" style="text-align:center;">You have not rented anything yet</td>
            </tr>
        <% }
           else
           {
               for (int i = 0; i < Model.CartInfo.RentalRecords.Count; i++)
               { %>

                <%: Html.DisplayFor(m => m.CartInfo.RentalRecords[i], "RentalGridRecord")%>
            <% }
           }%>
            <tr class="tf_row">
                <td class="tf_cell" colspan="3">TOTAL AMOUNT (including GST of <%: Html.DisplayFor(m => m.CartInfo.GST)%>%):</td>
                <td class="tf_cell" style="font-family:courier new, Verdana;text-align:right;padding-right:5px;"><%: Html.DisplayFor(m => m.CartInfo.TotalAmount, "Currency") %></td>
            </tr>
        </table>
    <% } %>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="ScriptsContent" runat="server">
</asp:Content>
